package wallFactory.builders;

import mapControl.GraphicsMapControl;

public abstract class WallBuilder {

	protected WallBox wall;
	GraphicsMapControl mapControl;
	
	
	public WallBuilder(GraphicsMapControl mapControl) {
		this.mapControl = mapControl;
	}
	
	
	public void createNewWallProduct() {
		wall = new WallBox();
		wall.setNode(mapControl.getPhysicsSpace().createStaticNode());
		
	}

	public abstract void buildModel();

	public abstract void buildTexture();

	public WallBox getWall() {
		return wall;
	}

	public void locate(int row, int col) {
		getWall().setRow(row);
		getWall().setCol(col);
		mapControl.getRootNode().attachChild(wall.getNode());
		wall.getNode().setLocalTranslation(
				mapControl.getTraslation(row, col));
	}

}
